perm filename DVIDOV.IAZ[UP,DOC]5 blob sn#706388 filedate 1983-04-14 generic text, type C, neo UTF8
COMMENT āŠ—   VALID 00002 PAGES
C REC  PAGE   DESCRIPTION
C00001 00001
C00002 00002	The DVIdover program converts a DVIfile (version 2, as generated by TEX82)
C00010 ENDMK
CāŠ—;
The DVIdover program converts a DVIfile (version 2, as generated by TEX82)
into a PRESS file and sends it to the Dover.

The simplest way to invoke the program is
	r dvidov; <dvi file name>
that will leave no trace of the PRESS file after it has been printed.

The program may be called with switches (one letter per switch):
	/s <press file name>...........	will put the output in the named file
	/m <integer>....................will use that number instead of the
					magnification given in the DVI file
	/f <spec of first page>.........first page printed will be the first
					page in the file whose tex counters
					match the given spec.
	/n <integer>....................maximum number of pages to print
	/x <number>.....................x position of the origin in the page
					in inches (width of left margin)
					Default is 1 inch.
	/y <number>.....................y position of the origin in the page
					in inches (width of top margin)
					Default is 1 inch.

The form of the specification for the first page is the same employed by DVItyp.
Thus, 2.*.-11.*.*.35 is the same as 2.*.-11.*.*.35.*.*
and both indicate the first page in the dvi file for which
\count0=2, \count2=-11 and \count5=35.
 
For example:
	r dvidov; foo/m 1800/s baz/f2/n 3/y .5
will generate a PRESS file named baz.pre in the user's directory with
magnification 1.8. This file will describe only pages 2,3,and 4 (assuming
\count0 has page number). Every page will be printed with half an inch of
margin on the top and one inch of margin on the left.

If the command line does not contain the name of a dvi file, or if
the given name does not correspond to an accessible file, the program
will initiate a dialog with the user. During this dialog the user
can give the name of the input file and also the spec of the first page
and number of pages to print if they were not given in the command line.

DVIdover understands some extended commands that allow TeX to draw
textured rectangles and polygonal lines.
For that purpose, dvidov keeps a table of 256 points numbered 0 to 255.
All point coordinates are initialized to 0, that is, points are set to
the top left corner of the page.
Point coordinates are remembered through page changes, thus making it easy
to refer to exactly the same position in several different pages.

To generate these commands in TeX one must use "\special" strings.
Numeric arguments are in decimal and the case of the command words is important.
The TeX commands that invoke them are:

\special{point <number>}

	Remember the current position under the given index.

\special{join <pen size> <number1> <number2> .. <numberl>}

	Draw straight line segments joining points <number1>
	and <number2>, <number2> and <number3>,.., <number(l-1)>
	and <numberl>.
	<pen size> gives the thickness of the line segment in units of size .01mm.
	It only recognizes certain sizes (2,4,6,8,12,16,32).  The smallest
	size is not known to work properly.  All other sizes are converted
	to 4.

\special{rectangle <number1> <character> <number2> <number3>}

	The four low order bits of <number1> describe the lower row
	of a 4*4 square bit pattern. The next higher four bits
	describe the third row from the top of that bit pattern.
	The next four bits describe the second row, and the next higher
	order four bits describe the top row.
	The bitmap given in this way will be replicated to fill
	the rectangular area.

	The <character> argument to "rectangle" gives the bit-painting
	function that should be used in this operation. (Caution: Only
	the `o' function is currently implemented, see below.)

		0	Clear the rectangle.
		1	Blacken the rectangle (the effect is the
			same as that of a rule of the same dimensions).
		s	Replace the previous contents of the rectangle
			by the new rectangle filled in with the pattern.
		o	Logical ``or'' the new rectangle on the previous
			contents. (Same as overstriking one bitmap
			with the other.)
		x	Logical ``xor'' the new rectangle on the previous contents.
		a	Logical ``and'' the two rectangles.

	<number2> and <number3> are point indices for two opposite
	corners of the rectangle.


CAVEAT: The Dover Spruce server can only handle bitmaps of certain sizes,
and it implements only the `o' bitmap painting function.
DVIdover must thus ignore some of the instructions from the DVI file,
to satisfy the requirements of the printing server.